View Full Version : find specific (hex)number of a model
Hello, i have a kind of a hard question. I've got this really basic game where you can walk around on some land and see some other figures that are walking around. Now i want to know if there is anyway to get some sort of number of every model that walks around.
I dont know what kind of number i can get from models, but maybe hexnumbers or something? Im gonna make a sepperate dll file for this and im gonna add it to the projects source. But what code do i have to add to find out the model (hex)numbers?? Im not sure if this can be done with OpenGL codes, if not can anyone tell me what i have to do instead to get those numbers.
Thanks for any help.
Are you trying to determine which "actor" you're looking at within a game you wrote?
If so, you'll want to shoot a ray from the camera position and see if it intersects the bounding box of one of the actors.
Or you can use OpenGL's feedback buffer,
or render every actor in the backbuffer in a separate color, and retrieve the color from a specific pixel.
Or do you mean something totally different?
No i mean, every model has to have a specific number. I want to get the number or polycount or somethiing like that from every model. In my game they are character from wich i want the know the polycount of or (hex)number. But dont know how to retrieve this.
Where did you get that "really basic game"? The answer to your question depends on that, because this is the responsibility of the code from your "really basic game" to return hex numbers for walking models.
So are you trying to get some statistics on how fast the game is being rendered or how complex/smart the rendering is?
GLTrace or GLIntercept might be an option.
However, I have no idea how big the performance hit is.
a friend of mine made that game. He says every character has specific value of polycounts. But i dont know how to retrieve the polycount and neither does he exactly, so im hoping to get any answer about this here.
For starters you could tell us which programming language was used to create the game.
If its C/C++ you will probably have a pointer to each object that can be used to to differentiate between objects.
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.