Display Size and loading Lenna - Printable Version +- Forums (http://www.scratchpadgames.net/forums) +-- Forum: Main Forums (http://www.scratchpadgames.net/forums/forumdisplay.php?fid=1) +--- Forum: Help my code won't work?? (http://www.scratchpadgames.net/forums/forumdisplay.php?fid=22) +--- Thread: Display Size and loading Lenna (/showthread.php?tid=74) Pages:
1
2
|
Display Size and loading Lenna - mayoricecream - 04-24-2018 Hello, When I try and get the pi to display the window in full-screen my monitor will turn black and stay black until the project breaks. When I hard code the resolution it works fine. For now I am just running the code with the resolution hard coded but any tips regarding this subject would be cool. I am also having another issue that could very well be a typo. When I try and get the picture of Lenna to come up I can see a opengl window opening up but the program output gives me a error until I break the program. I believe it has something to do when I draw the rectangle but I am not certain. RE: Display Size and loading Lenna - Brian Beuken - 04-24-2018 Hi Juston what code are you using to create full screen? and what is the error that the code outputs. RE: Display Size and loading Lenna - mayoricecream - 04-24-2018 The code I use for full screen is Code: uint width, height; As far as the error I get when loading Lenna it is just the oh bugger from this block of code: Code: /* RE: Display Size and loading Lenna - Brian Beuken - 04-24-2018 hmmm looks, ok, better zip it up and send it over to me... Easier for me to debug in person RE: Display Size and loading Lenna - Brian Beuken - 04-24-2018 ah wait... I see something What vertex position are you loading? See if you can see it RE: Display Size and loading Lenna - Brian Beuken - 04-24-2018 I see something else but it will depend what values you have for indices? RE: Display Size and loading Lenna - mayoricecream - 04-24-2018 Well I fixed the issue in the vertex position, was loading &RecVertices[3] when I should have been doing just RecVertices. As far as the values i have for my indices I believe it is this: Code: GLushort indices[] = { 0, 1, 2, 0, 2, 3 }; RE: Display Size and loading Lenna - Brian Beuken - 04-24-2018 yeah indices are fine, and you fixed the typo in vertices, which is the base point where the vertices start, so by setting it 3 more, the count would go past the values and give you some odd content which can result in nothing being displayed. Did that fix the problems, you can now see Lenna? If not, zip it up, and I'll check it out in the morning, its a little late here in Holland and I am heading for bed. RE: Display Size and loading Lenna - Brian Beuken - 04-25-2018 ok since you sent me the code I had a quick look and its a bit of a mess, why do you have multiple build configurations? It looks like you have an MSbuild config but not properly set up. Because of this strange mix of MSBuld and GNU I can't actually get your project to run Can I suggest you scrap this, start a new project and this time be careful to select GNU make... Other issues, well you have a pragama once in your code in the cpp file, you should only put them in .h files. in your Files to transfer you are mixing separators, you use ; for the 1st 5 or 6 then a , you can't mix them, GNU make wants to see ; MSbuild wants to see , In your Main loop here, do you see that you are trying to draw, something BEFORE you load it? The book does say to load it after the Filehandler There's an important typo too, when you try to find the address of a_position attribute, ..see if you can find that Code: int main(int argc, char *argv[]) Something else to look at in the main loop, once you move that texture creation to just after FileHandler, what happens to the value we store in p_state->user_data->textureID .....if a few lines later we init p_state have a think... But for sure, create a new project, I dunno what the exact cause is for the multiple configs and semi msbuild stuff, but it is confusing, so much quicker to start again and just copy your files into the new GNU Make Project. I've fixed your project here, but I really want you to try to locate the issues, so let me know tomorrow if you need me to send this back to you as a working version. RE: Display Size and loading Lenna - Brian Beuken - 04-25-2018 The Display size, is something else, I need to check that out. and after a quick check, the early systems don't properly set up the display size to allow for full screen display, but you can add to the init_ogl function and the display will stretch to the size of your screen Code: state->width = width; |