Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Need DarkGDK Lock/Unlock Vertex Command. U know what is is?

Author
Message
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 15th Dec 2007 16:21
I'm trying to learn something from RainMan - who posted in DBPro forum how to make a mesh in memory and mess with textures etc.

Rain main made a nice step by step "psuedo" code example. But - 1: It's DBPRo - no prob - I'm converting as I go...which brought me here:

Quote: "3. Lock the vertex data.

4. Do a FOR/NEXT loop with the following command:
SET VERTEXDATA UV VertexNumber, TextureStage, U, V

The number of iterations is, once again, the number of vertices.

5. Unlock the vertex data.
"


#3 and #5 - I don't know (searched the GDK Help) the commands for this. I'm hoping I'm being DAFT and its there and YOU know it - and you'll hopefully share the info with me

tparkin
17
Years of Service
User Offline
Joined: 28th Mar 2007
Location:
Posted: 15th Dec 2007 20:24 Edited at: 15th Dec 2007 20:26


You would create an object -> mesh then lock it using dbLockVertexDataForMesh().

Be sure to dbUnlcokVertexData() when you are done. Also you will need to update the mesh if you made changes using dbChangeMesh()

Below are some other functions you might need:



All of these can be found in DarkSDKBasic3D.h in the /Includes/ folder of your DarkGDK installation.
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 15th Dec 2007 20:36
You Rule!


(Wish they were all in the manual )

tparkin
17
Years of Service
User Offline
Joined: 28th Mar 2007
Location:
Posted: 16th Dec 2007 01:31
I usually refer to the header files, or if all else fails the DarkBasic Pro Trial help file to see a description of how to use the function.

Login to post a reply

Server time is: 2024-11-17 00:35:26
Your offset time is: 2024-11-17 00:35:26