My first go with MX2 (spinning 3d cube)

About Monkey 2 Forums Monkey 2 Projects My first go with MX2 (spinning 3d cube)

This topic contains 14 replies, has 4 voices, and was last updated by  cocon 2 years, 4 months ago.

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #4883

    codifies
    Participant

    I ported part of some GLES2.0 code of mine in order to learn and evaluate MX2

    Although probably not terribly good code from an MX2 point of view, I’ve ended up with a 3d textured and coloured cube in the centre of a window without too much drama, but possibly way more code that needed for something so simple (but I’ll probably build on it)

    You can read my initial thoughts on MX2 and grab the code (for what its worth) here http://bedroomcoders.co.uk/monkey-x-2-a-first-look/

    #4885

    Mark Sibly
    Keymaster

    Alas, it’s not working here – I get the glClearColor changes but nothing else.

    I had a quick look at the code and you appear to be linking the shader twice. Also, you need to glBindAttribute *before* linking the shader I believe.

    But I fixed these and still no go so I’m not sure what’s up, will take another look tomorrow.

    And thanks for the write up, will be linking to it soon!

    #4887

    codifies
    Participant

    interesting, linking bindings separately has always just worked for me…

    What hardware do you have ?

    I’m running on an Intel HD5500 gpu (Mesa drivers) on Void Linux

    #4888

    codifies
    Participant

    I tried it on a GeForce GT 640 and it works okay 🙁 – ironic I *want* it to fail so I can fix it!!!

    You won’t be suprised to hear that doing a single link of the shader also works 😉

    Maybe someone else can weigh in with a failure report, so I can get some clue as to the issue

    #4889

    codifies
    Participant

    mark, just a thought…

    I wonder if its any of this might be pertinent

    You might want to play around, for example if you don’t have a depth buffer you wont see anything obviously – you might want to comment out the enable for that to see what happens…

    commenting out the RGB size attribs should be fine (no doubt you know this)

    context version seems to be needed by intel GPU hardware….

    #4891

    codifies
    Participant

    so… noticed I hadn’t implicitly set the viewport… *sigh*

    I added a function pointer for the event handler too, so you can exit with the escape key too – its years since I did anything with SDL! has anyone wrapped GLFW3 ?

    I’ve stripped out the attribute stuff as turns out I don’t need it after all – must have been changing more than one thing at a time again…

    I’ve updated the tar ball on my blog post

    #4892

    Jesse
    Participant

    I just tried to run it and keep getting an error. It compiles fine but fails to execute with a “Memory access violation” in this line:

    [/crayon]

    I wonder if its because its an older computer. I tried to run the banana’s “sdl2Ttest” and it gives me the same error.

    Early 2011 Macbook pro 2.3 GHz Intel Core i5 El Capitan.

    #4894

    codifies
    Participant

    how “early” is it, I’m not sure what Mac GLES support is like, if the sdl2test doesn’t work it could be because either you don’t have the needed dependencies or lacking OS support – if you dual boot, then you could maybe test under Linux?

    #4898

    Jesse
    Participant

    I believe it’s updated through Xcode and I got the latest version for my model number with El Capitan. It just seems to be the outdated hardware. if there is some other way to update it, I don’t know.

    #4899

    codifies
    Participant

    according to here https://support.apple.com/kb/sp619?locale=en_US

    its an HD3000 GPU so it should do at least OpenGL 3.0 on Linux so I’d have though GLES2.0 support should be fine, however I’m less confident about Apples support for older hardware ???

    #4901

    codifies
    Participant

    from http://www.phoronix.com/scan.php?page=news_item&px=MTMwMDg

    Intel HD 2000/3000 “Sandy Bridge” hardware is also OpenGL ES 3.0 capable, but not officially right now. There’s patches heading to Mesa 9.1 that will allow OpenGL ES 3.0 to officially work on this generation-old Intel hardware. Intel will be submitting Sandy Bridge results to Khronos soon.

    which is out of date ! Mesa is now at version 13 (at least on my box)

    so if you want a new lease of life for your older hardware, you might want to try Linux on it…

    #4902

    Jesse
    Participant

    I like Linux. I just don’t like the way it runs on my Macbook. It doesn’t feel right. I had it installed on it but when my HD started to fail, I removed the partition. I need to get a new HD but the hassle of reinstalling software and moving files has deterred me from doing it. I know I have to do it, I just have been too busy and too lazy to want to tackle it.

    #4903

    codifies
    Participant

    Time for a new laptop?

    #4904

    Jesse
    Participant

    I wish it was that easy. 🙁

    #5304

    cocon
    Participant

    Very nice stuff, currently I have in the works to create a cool 3D cube, but I have stucked a bit. I might get some ideas by your code because things get stuck.

    Here I have started a thread that it will based mostly on OpenGL snippets.
    http://monkey2.monkey-x.com/forums/topic/monkey2-opengl-experiments/

Viewing 15 posts - 1 through 15 (of 15 total)

You must be logged in to reply to this topic.